//package com.sx.manage.controller.test;
//
//import java.util.List;
//
//import javax.annotation.Resource;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.validation.Validator;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//import com.sx.cache.Cache;
//import com.sx.common.util.NumberUtil;
//import com.sx.manage.biz.consumer.info.IMNetworkPersonConsumerBiz;
//import com.sx.manage.external.dubbo.consumer.IMComPersonDubboService;
//import com.sx.manage.external.dubbo.consumer.IMConsumerDubboService;
//import com.sx.manage.external.dubbo.login.IMLoginDubboService;
//import com.sx.manage.service.company.MCompanyWebServiceImpl;
//import com.sx.manage.service.consumer.MConsumerWebServiceImpl;
//import com.sx.manage.service.consumer.MPersonConsumerInfoWebServiceImpl;
//import com.sx.manage.servlet.ViewAndModel;
//import com.sx.model.constants.type.consumer.MInfoEditApplyStatus;
//import com.sx.model.manage.mybatis.form.bank.MConsumerBankMapForm;
//import com.sx.model.manage.mybatis.form.consumer.MPersonalConsumerNetworkForm;
//import com.sx.model.manage.mybatis.vo.consumer.MVerifOpenAccountVO;
//import com.sx.model.manage.mybatis.vo.consumer.login.MConsumerLoginVO;
//import com.sx.model.manage.mybatis.vo.consumer.login.MPersonConsumerLoginVO;
//import com.sx.model.manage.mybatis.vo.function.MFunctionInfoVO;
//import com.sx.model.manage.mybatis.vo.result.ResultBooleanVO;
//import com.sx.model.manage.mybatis.vo.result.ResultVerifyVO;
//import com.sx.model.manage.mybatis.web.vo.huaxia02.B2BQueryAccountVO;
//
///**
// * spring 基础控制器
// * 
// * @author lenovo
// *
// */
//@Controller
//@RequestMapping("/test")
//public class MTestControllerTest1 {
//	private Logger _log = LoggerFactory.getLogger(this.getClass());
//	@Resource(name = "redisCache")
//	protected Cache cache;
//
//	@Autowired
//	protected HttpServletRequest request;
//
//	@Autowired
//	protected HttpServletResponse response;
//	// 主动校验 前台传入的数据格式
//	@Autowired
//	protected Validator validator;
//
//	// 用户web端
//	@Resource(name = "consumerWebServiceImpl")
//	private MConsumerWebServiceImpl consumerWebServiceImpl;
//	// 个人web端
//	@Resource(name = "personConsumerInfoWebServiceImpl")
//	private MPersonConsumerInfoWebServiceImpl personConsumerInfoWebServiceImpl;
//	
//	// 个人用户信息
//	@Resource(name="mNetworkPersonConsumerBizImpl")
//	private IMNetworkPersonConsumerBiz mNetworkPersonConsumerBizImpl;
//	//公司信息web 端service
//	@Resource(name="companyWebServiceImpl")
//	private MCompanyWebServiceImpl companyWebServiceImpl;
//	
//	/** 后台-公司开通华夏交易会员代码**/
//	@RequestMapping(value = "/companyAccountInfoHuaxia02")
//	@ResponseBody
//	public ResultVerifyVO<MVerifOpenAccountVO> companyAccountInfoHuaxia02(Long[] companyIds) {
//		_log.info("companyIds={}", NumberUtil.arrayToStr(companyIds));
//		return companyWebServiceImpl.accountInfoHuaxia02(companyIds);
//	}
//	
//	/** 后台-用户信息审核 **/
//	@RequestMapping(value = "/editConsumerStatusManage")
//	@ResponseBody
//	public ResultBooleanVO editConsumerStatusManage(Long[] consumer_ids,MInfoEditApplyStatus status,Long consumer_id) {
//		_log.info("consumer_ids={}", consumer_ids);
//		_log.info("status={},consumer_id={}",status);
//		_log.info("consumer_id={}", consumer_id);
//		return mNetworkPersonConsumerBizImpl.consumer_edit_status(consumer_ids,status, loginConsumer_test(consumer_id));
//	}
//	
//	/** 公司用户信息代改 **//*
//	@RequestMapping(value = "/editConsumerStatus")
//	@ResponseBody
//	public ResultBooleanVO editConsumerStatus(Long[] consumer_ids,MInfoEditApplyStatus status,Long consumer_id) {
//		_log.info("consumer_ids={}", consumer_ids);
//		_log.info("status={},consumer_id={}",status);
//		_log.info("consumer_id={}", consumer_id);
//		return mCompanyManagePersonalDubboService.editConsumerStatus(consumer_ids,status, loginConsumer_test(consumer_id));
//	}
//	
//	*//** 公司用户信息代改 **//*
//	@RequestMapping(value = "/companyReplaceConsumerEdit")
//	@ResponseBody
//	public ResultBooleanVO companyReplaceConsumerEdit(@RequestBody MPersonalConsumerNetworkForm form) {
//		_log.info("form={}", form);
//		return mCompanyManagePersonalDubboService.companyReplaceConsumerEdit(form, loginConsumer_test(form.getConsumer_id()));
//	}
//
//	*//** 验证设备ID是否存在 *//*
//	@RequestMapping(value = "/verify_deviceName1")
//	@ResponseBody
//	public ResultBooleanVO verify_deviceName1(Long consumer_id, Long company_id) {
//		// 登陆
//		MConsumerLoginVO loginVO7 = new MConsumerLoginVO();
//		loginVO7.setLogin_num("18600227684");
//		loginVO7.setPassword("1qaz2WSX");
//		try {
//		
//			List<MFunctionInfoVO> funList = loginValidateDubboServiceImpl.getComConsumerFunctionList(consumer_id, company_id).getData();
//			for (MFunctionInfoVO infoVO : funList) {
//				_log.info(infoVO.getId() + ":" + infoVO.getFunction_name() + ":" + infoVO.getSno() + ":" + infoVO.getPid() + ":" + infoVO.getFunction_code() + ":" + infoVO.getNodeNum());
//			}
//		} catch (Exception e) {
//			_log.info("error={}",e);
//		}
//		return new ResultBooleanVO();
//	}
//
//	@RequestMapping(value = "/verify_deviceName")
//	@ResponseBody
//	public ViewAndModel verify_deviceName(Long consumer_id, Long company_id) {
//		ViewAndModel model = null;
//		List<MFunctionInfoVO> funList = loginValidateDubboServiceImpl.getComConsumerFunctionList(consumer_id, company_id).getData();
//		for (MFunctionInfoVO infoVO : funList) {
//			_log.info(infoVO.getId() + ":" + infoVO.getFunction_name() + ":" + infoVO.getSno() + ":" + infoVO.getPid() + ":" + infoVO.getFunction_code() + ":" + infoVO.getNodeNum());
//		}
//
//		// 跳转登录失败界面
//		model = new ViewAndModel("nav1", request, cache);
//		model.addObject("funcList", funList);
//		return model;
//	}*/
//
///*	*//** 用户自己提出修改信息 *//*
//	@RequestMapping(value = "/consumerEditByLoginConsumer")
//	@ResponseBody
//	public ResultBooleanVO consumerEditByLoginConsumer(@RequestBody MPersonalConsumerNetworkForm form) {
//		_log.info("form={}", form);
//
//		return mPersonalConsumerNetworkDubboServiceImpl.consumerEditByLoginConsumer(form, loginConsumer_Person(form.getConsumer_id()));
//	}
//
//	*//** 用户银行卡信息录入 *//*
//	@RequestMapping(value = "/insertNotDefault")
//	@ResponseBody
//	public ResultBooleanVO insertNotDefault(@RequestBody MConsumerBankMapForm bankMapForm, Long consumer_id) {
//		_log.info("consumer_id={},bankMapForm={}", consumer_id, bankMapForm);
//		return mPersonalConsumerNetworkDubboServiceImpl.insertNotDefault(bankMapForm, loginConsumer_Person(consumer_id));
//	}*/
//
//	public Cache getCache() {
//		return cache;
//	}
//
//	public void setCache(Cache cache) {
//		this.cache = cache;
//	}
//
//	public HttpServletRequest getRequest() {
//		return request;
//	}
//
//	public void setRequest(HttpServletRequest request) {
//		this.request = request;
//	}
//
//	public HttpServletResponse getResponse() {
//		return response;
//	}
//
//	public void setResponse(HttpServletResponse response) {
//		this.response = response;
//	}
//
//	public Validator getValidator() {
//		return validator;
//	}
//
//	public void setValidator(Validator validator) {
//		this.validator = validator;
//	}
//
//	public MConsumerWebServiceImpl getConsumerWebServiceImpl() {
//		return consumerWebServiceImpl;
//	}
//
//	public void setConsumerWebServiceImpl(MConsumerWebServiceImpl consumerWebServiceImpl) {
//		this.consumerWebServiceImpl = consumerWebServiceImpl;
//	}
//
//	public MPersonConsumerInfoWebServiceImpl getPersonConsumerInfoWebServiceImpl() {
//		return personConsumerInfoWebServiceImpl;
//	}
//
//	public void setPersonConsumerInfoWebServiceImpl(MPersonConsumerInfoWebServiceImpl personConsumerInfoWebServiceImpl) {
//		this.personConsumerInfoWebServiceImpl = personConsumerInfoWebServiceImpl;
//	}
//
//	/**
//	 * 获取当前用户信息
//	 * 
//	 * @param request
//	 * @return
//	 */
//	public MConsumerLoginVO loginConsumer_test(Long consumer_id) {
//		MConsumerLoginVO userVO = new MConsumerLoginVO();
//		userVO.setConsumer_name("post测试专用户");
//		userVO.setConsumer_id(Long.valueOf(10215));
//		if (null != consumer_id) {
//			userVO.setConsumer_id(consumer_id);
//		}
//		userVO.setMobile_tel("15901085528");
//		return userVO;
//	}
//	/**
//	 * 子账户信息查询
//	 * @param consumer_id
//	 * @return
//	 */
//	@RequestMapping(value = "getAccountInfo")
//	@ResponseBody
//	public B2BQueryAccountVO getAccountInfo(Long consumer_id){
//		_log.debug("子账户信息变更consumer_id={}",consumer_id);
//		return consumerWebServiceImpl.getAccountInfo(consumer_id);
//	}
//	/**
//	 * 获取当前用户信息
//	 * 
//	 * @param request
//	 * @return
//	 */
//	public MPersonConsumerLoginVO loginConsumer_Person(Long consumerId) {
//		MPersonConsumerLoginVO userVO = new MPersonConsumerLoginVO();
//		userVO.setConsumer_name("post测试专用户");
//		userVO.setConsumer_id(consumerId);
//		return userVO;
//	}
//	/**
//	 * 子账户信息查询
//	 * @param consumer_id
//	 * @return
//	 */
//	@RequestMapping(value = "eidt_company/getAccountInfo")
//	@ResponseBody
//	public B2BQueryAccountVO getAccountInfo1(Long company_id){
//		_log.debug("子账户信息变更consumer_id={}",company_id);
//		return companyWebServiceImpl.getAccountInfo(company_id);
//	}
//}
